package com.team7.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer;
import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.List;

/**
 * @program: team7-object
 * @description:
 * @author: 田宏洋
 * @create: 2021-10-18 20:29
 **/
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("edu_subject")
@ApiModel(value="课程科目对象", description="课程科目")
public class Subject implements Serializable {
    private static final long serialVersionUID = 1L;
    @ApiModelProperty(value = "课程类别ID")
    private String id;

    @ApiModelProperty(value = "类别名称")
    private String title;
    @ApiModelProperty(value = "父ID")
    private String parentId;

    @ApiModelProperty(value = "课程分类的状态 0 正常  1  禁用")
    private String statusId;
    @ApiModelProperty(value = "备注")
    private String remark;

    @ApiModelProperty(value = "排序字段")
    private Integer sort;

    @ApiModelProperty(value = "创建时间")
    @TableField(value = "gmt_create",fill = FieldFill.INSERT)
    private String gmtCreate;

    @ApiModelProperty(value = "更新时间")
    @TableField(value = "gmt_modified",fill = FieldFill.INSERT_UPDATE)
    private String gmtModified;

    //该课程分类下所有的子课程分类
    @TableField(exist = false)//表示该属性不是数据库中的列
    public List<Subject> children;
}
